package User

import "OnlineRetailers/models/Admin"

type WXUser struct {
	No        string `orm:"size(30)"`
	Key       string `orm:"size(40)"`
	Name      string `orm:"size(30)"`            //名
	Picture   string `orm:"size(200);null"`      //头像图片
	OpenId    string `orm:"size(50) ;pk;unique"` //用户唯一标识名
	PhoneNo   string `orm:"size(20)"`            //电话号码
	CouponNum int
	Black     byte            //0是正常 1是冻结
	Order     []*Order        `orm:"reverse(many)"`                //反向外键	订单外键 多对多
	Score     []*Score        `orm:"reverse(many)"`                //反向外键
	Coupon    []*Admin.Coupon `orm:"rel(m2m);on_delete(set_null)"` //优惠券外键 多对多
	Address   *Address        `orm:"rel(fk)"`                      //默认地址
}
